#!/usr/bin/env escript

%% simple cli using cli behaviour

-behaviour(cli).
-mode(compile).
-export([cli/0, rm/3]).

main(Args) ->
    cli:run(Args, #{progname => "simple"}).

cli() ->
    #{
        handler => {?MODULE, rm, undefined},
        arguments => [
            #{name => force, short => $f, type => boolean, default => false},
            #{name => recursive, short => $r, type => boolean, default => false},
            #{name => dir}
        ]
    }.

rm(Force, Recursive, Dir) ->
    io:format("Removing ~s (force: ~s, recursive: ~s)~n",
        [Dir, Force, Recursive]).
